The present invention generally relates to electronic spreadsheets. More particularly, the present invention relates to storing automation objects within the cells of a spreadsheet.
Spreadsheet application users are utilizing spreadsheets in more and more sophisticated ways. While spreadsheets were once primarily used to facilitate financial and technical calculations and analyses, users are demanding the ability to create and invoke user-defined functions within spreadsheets. Often, spreadsheet applications are used to create functioning spreadsheet objects that can be accessed over the Internet.
On a basic level, a spreadsheet is ultimately a programming tool. The cells of a spreadsheet can be used to store both data and formulas for manipulating data. However, unlike more sophisticated programming environments such as BASIC, C++, and Pascal, conventional spreadsheets provide no means to implement functional components (automation objects) residing outside of the spreadsheet. With the ever-expanding popularity of object-oriented programming models, valuable programming tools have been made available in the form of discrete, stand-alone automation objects. With the advent of component management systems, such as the Component Object Model, marketed by Microsoft Corporation of Redmond, Wash., such objects are generally readily accessible to other objects through the component management system.
Unfortunately, conventional spreadsheet applications have not provided access to external objects. As a result, conventional spreadsheets have served a limited role as a programming tool, as compared to the more sophisticated programming environments mentioned above. Therefore, there is a need in the art for a spreadsheet component that can be used to create a spreadsheet object that can access external objects through a component management system. The spreadsheet object should be able to process formulas that invoke external objects and store objects in the cells of the spreadsheet object. The spreadsheet object also should process formulas invoking the external object after the object has been stored in a spreadsheet cell and should recognize an object as a new data type.
The present invention is a spreadsheet component that provides a rich programming and modeling environment. The spreadsheet component of the present invention does this by recognizing a new xe2x80x9cobjectxe2x80x9d data type in addition to the conventional spreadsheet data types: numbers, text, date, Boolean, and error. The object data type enables a spreadsheet object to have an embedded instance of an external object that exists outside of the spreadsheet component. Once an object has been created within a spreadsheet object, the object can be invoked from any other cell or formula in the spreadsheet object.
The spreadsheet component of the present invention provides several special object functions that operate to enable a user to create and invoke an object. A user can directly call functions from objects that are installed on a local or remote machine, by integrating an object function within a spreadsheet formula. Thus, the user is provided with a tool for integrating outside data services and functionality into a spreadsheet object. Moreover, the user may take advantage of pre-existing external objects.
The spreadsheet component makes available a new class of object functions. This new class of object functions may be integrated into formulas (as can most spreadsheet function). The spreadsheet component also recognizes the xe2x80x9c.xe2x80x9d operator that is the conventional means (in object models) for separating object names and properties. This operator enables reference to specific object properties within the external object. Advantageously, the spreadsheet component of the present invention provides a sophisticated programming environment wherein a spreadsheet object can be enhanced with the ability to invoke the functionality of external objects through a component management system.
In one aspect of the present invention a method is provided for embedding an external object in a spreadsheet cell of a spreadsheet object. The method receives an object function and an external object identifier as input. The method parses the object function to determine whether the object function is valid and has a proper syntax. The method also accesses the external object identified by the external object identifier, to determine whether the external object is functional. If the object function is valid and has a proper syntax, then the method stores an embedded object in the spreadsheet cell. If the external object is functional, then the method recalculates the spreadsheet cell.
In another aspect of the present invention, a spreadsheet component is provided having an object function for invoking an external object. The spreadsheet component has a formula parser component and a recalculation component. The parser component functions to compare the object function to a function library to determine whether the object function conforms to a predefined syntax contained in a library entry associated with the object function. The parser component also functions to determine whether the object function properly identifies the external object. If the parser component determines that the object function conforms to the predefined syntax and properly identifies the external object, then the recalculation component functions to invoke the external object identified by the object function.
The various aspects of the present invention may be more clearly understood and appreciated from a review of the following detailed description of the disclosed embodiments and by reference to the drawings and claims.